<?php
class Zendvn_Validate_PassConfirm extends Zend_Validate_Abstract{
	
	const PASS_NOT_EQUAL   = 'passNotEqual';
   
    protected $_messageTemplates = array(
        self::PASS_NOT_EQUAL  => "Password va password confirm khong giong nhau"
    );
	
	private $_passConfirm;
	public function __construct($passConfirm = null){
		$this->_passConfirm = $passConfirm;
	}
	
	public function isValid($value){
		if($value !== $this->_passConfirm){
			$this->_error(self::PASS_NOT_EQUAL,$value);
			return false;
		}
		return true;
	}
}